-- GENERATED SPELL FOR [Stormwind Elite] --


function spell0_32387(pUnit, Event) --@Hamstring,n/a--
pUnit:FullCastSpellOnTarget(9080,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32387', 10344, 1)
end

function spell1_32387(pUnit, Event) --@Shield Bash,n/a--
pUnit:FullCastSpellOnTarget(11972,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32387', 8349, 1)
end

function spell2_32387(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(14516,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32387', 559, 1)
end

function Sorts_32387(pUnit, Event)
local choix_sorts_32387 = math.random(0, 2)
if choix_sorts_32387 == 0 then
pUnit:RegisterEvent('spell0_32387', 1, 1)
end
if choix_sorts_32387 == 1 then
pUnit:RegisterEvent('spell1_32387', 1, 1)
end
if choix_sorts_32387 == 2 then
pUnit:RegisterEvent('spell2_32387', 1, 1)
end
end

function mob32387_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32387', math.random(1500, 3000), 1)
end

function mob32387_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32387_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32387_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32387, 1, 'mob32387_Action')
RegisterUnitEvent(32387, 2, 'mob32387_Leave')
RegisterUnitEvent(32387, 3, 'mob32387_Kill')
RegisterUnitEvent(32387, 4, 'mob32387_Die')
